Optimal. Leaf size=358 \[ -\frac{b^{5/2} \left (7 a^2+3 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{\tan (c+d x)}}{\sqrt{a}}\right )}{a^{5/2} d \left (a^2+b^2\right )^2}+\frac{\left (a^2+2 a b-b^2\right ) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} d \left (a^2+b^2\right )^2}-\frac{\left (a^2+2 a b-b^2\right ) \tan ^{-1}\left (\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} d \left (a^2+b^2\right )^2}+\frac{b^2}{a d \left (a^2+b^2\right ) \sqrt{\tan (c+d x)} (a+b \tan (c+d x))}-\frac{2 a^2+3 b^2}{a^2 d \left (a^2+b^2\right ) \sqrt{\tan (c+d x)}}-\frac{\left (a^2-2 a b-b^2\right ) \log \left (\tan (c+d x)-\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{2 \sqrt{2} d \left (a^2+b^2\right )^2}+\frac{\left (a^2-2 a b-b^2\right ) \log \left (\tan (c+d x)+\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{2 \sqrt{2} d \left (a^2+b^2\right )^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.762616, antiderivative size = 358, normalized size of antiderivative = 1., number of steps used = 16, number of rules used = 13, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.565, Rules used = {3569, 3649, 3653, 3534, 1168, 1162, 617, 204, 1165, 628, 3634, 63, 205} \[ -\frac{b^{5/2} \left (7 a^2+3 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{\tan (c+d x)}}{\sqrt{a}}\right )}{a^{5/2} d \left (a^2+b^2\right )^2}+\frac{\left (a^2+2 a b-b^2\right ) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} d \left (a^2+b^2\right )^2}-\frac{\left (a^2+2 a b-b^2\right ) \tan ^{-1}\left (\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} d \left (a^2+b^2\right )^2}+\frac{b^2}{a d \left (a^2+b^2\right ) \sqrt{\tan (c+d x)} (a+b \tan (c+d x))}-\frac{2 a^2+3 b^2}{a^2 d \left (a^2+b^2\right ) \sqrt{\tan (c+d x)}}-\frac{\left (a^2-2 a b-b^2\right ) \log \left (\tan (c+d x)-\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{2 \sqrt{2} d \left (a^2+b^2\right )^2}+\frac{\left (a^2-2 a b-b^2\right ) \log \left (\tan (c+d x)+\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{2 \sqrt{2} d \left (a^2+b^2\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3569
Rule 3649
Rule 3653
Rule 3534
Rule 1168
Rule 1162
Rule 617
Rule 204
Rule 1165
Rule 628
Rule 3634
Rule 63
Rule 205
Rubi steps
\begin{align*} \int \frac{1}{\tan ^{\frac{3}{2}}(c+d x) (a+b \tan (c+d x))^2} \, dx &=\frac{b^2}{a \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)} (a+b \tan (c+d x))}+\frac{\int \frac{\frac{1}{2} \left (2 a^2+3 b^2\right )-a b \tan (c+d x)+\frac{3}{2} b^2 \tan ^2(c+d x)}{\tan ^{\frac{3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx}{a \left (a^2+b^2\right )}\\ &=-\frac{2 a^2+3 b^2}{a^2 \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)}}+\frac{b^2}{a \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)} (a+b \tan (c+d x))}-\frac{2 \int \frac{\frac{1}{4} b \left (4 a^2+3 b^2\right )+\frac{1}{2} a^3 \tan (c+d x)+\frac{1}{4} b \left (2 a^2+3 b^2\right ) \tan ^2(c+d x)}{\sqrt{\tan (c+d x)} (a+b \tan (c+d x))} \, dx}{a^2 \left (a^2+b^2\right )}\\ &=-\frac{2 a^2+3 b^2}{a^2 \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)}}+\frac{b^2}{a \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)} (a+b \tan (c+d x))}-\frac{2 \int \frac{a^3 b+\frac{1}{2} a^2 \left (a^2-b^2\right ) \tan (c+d x)}{\sqrt{\tan (c+d x)}} \, dx}{a^2 \left (a^2+b^2\right )^2}-\frac{\left (b^3 \left (7 a^2+3 b^2\right )\right ) \int \frac{1+\tan ^2(c+d x)}{\sqrt{\tan (c+d x)} (a+b \tan (c+d x))} \, dx}{2 a^2 \left (a^2+b^2\right )^2}\\ &=-\frac{2 a^2+3 b^2}{a^2 \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)}}+\frac{b^2}{a \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)} (a+b \tan (c+d x))}-\frac{4 \operatorname{Subst}\left (\int \frac{a^3 b+\frac{1}{2} a^2 \left (a^2-b^2\right ) x^2}{1+x^4} \, dx,x,\sqrt{\tan (c+d x)}\right )}{a^2 \left (a^2+b^2\right )^2 d}-\frac{\left (b^3 \left (7 a^2+3 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{x} (a+b x)} \, dx,x,\tan (c+d x)\right )}{2 a^2 \left (a^2+b^2\right )^2 d}\\ &=-\frac{2 a^2+3 b^2}{a^2 \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)}}+\frac{b^2}{a \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)} (a+b \tan (c+d x))}+\frac{\left (a^2-2 a b-b^2\right ) \operatorname{Subst}\left (\int \frac{1-x^2}{1+x^4} \, dx,x,\sqrt{\tan (c+d x)}\right )}{\left (a^2+b^2\right )^2 d}-\frac{\left (a^2+2 a b-b^2\right ) \operatorname{Subst}\left (\int \frac{1+x^2}{1+x^4} \, dx,x,\sqrt{\tan (c+d x)}\right )}{\left (a^2+b^2\right )^2 d}-\frac{\left (b^3 \left (7 a^2+3 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{a^2 \left (a^2+b^2\right )^2 d}\\ &=-\frac{b^{5/2} \left (7 a^2+3 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{\tan (c+d x)}}{\sqrt{a}}\right )}{a^{5/2} \left (a^2+b^2\right )^2 d}-\frac{2 a^2+3 b^2}{a^2 \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)}}+\frac{b^2}{a \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)} (a+b \tan (c+d x))}-\frac{\left (a^2-2 a b-b^2\right ) \operatorname{Subst}\left (\int \frac{\sqrt{2}+2 x}{-1-\sqrt{2} x-x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{2 \sqrt{2} \left (a^2+b^2\right )^2 d}-\frac{\left (a^2-2 a b-b^2\right ) \operatorname{Subst}\left (\int \frac{\sqrt{2}-2 x}{-1+\sqrt{2} x-x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{2 \sqrt{2} \left (a^2+b^2\right )^2 d}-\frac{\left (a^2+2 a b-b^2\right ) \operatorname{Subst}\left (\int \frac{1}{1-\sqrt{2} x+x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{2 \left (a^2+b^2\right )^2 d}-\frac{\left (a^2+2 a b-b^2\right ) \operatorname{Subst}\left (\int \frac{1}{1+\sqrt{2} x+x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{2 \left (a^2+b^2\right )^2 d}\\ &=-\frac{b^{5/2} \left (7 a^2+3 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{\tan (c+d x)}}{\sqrt{a}}\right )}{a^{5/2} \left (a^2+b^2\right )^2 d}-\frac{\left (a^2-2 a b-b^2\right ) \log \left (1-\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{2 \sqrt{2} \left (a^2+b^2\right )^2 d}+\frac{\left (a^2-2 a b-b^2\right ) \log \left (1+\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{2 \sqrt{2} \left (a^2+b^2\right )^2 d}-\frac{2 a^2+3 b^2}{a^2 \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)}}+\frac{b^2}{a \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)} (a+b \tan (c+d x))}-\frac{\left (a^2+2 a b-b^2\right ) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} \left (a^2+b^2\right )^2 d}+\frac{\left (a^2+2 a b-b^2\right ) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1+\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} \left (a^2+b^2\right )^2 d}\\ &=\frac{\left (a^2+2 a b-b^2\right ) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} \left (a^2+b^2\right )^2 d}-\frac{\left (a^2+2 a b-b^2\right ) \tan ^{-1}\left (1+\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} \left (a^2+b^2\right )^2 d}-\frac{b^{5/2} \left (7 a^2+3 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{\tan (c+d x)}}{\sqrt{a}}\right )}{a^{5/2} \left (a^2+b^2\right )^2 d}-\frac{\left (a^2-2 a b-b^2\right ) \log \left (1-\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{2 \sqrt{2} \left (a^2+b^2\right )^2 d}+\frac{\left (a^2-2 a b-b^2\right ) \log \left (1+\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{2 \sqrt{2} \left (a^2+b^2\right )^2 d}-\frac{2 a^2+3 b^2}{a^2 \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)}}+\frac{b^2}{a \left (a^2+b^2\right ) d \sqrt{\tan (c+d x)} (a+b \tan (c+d x))}\\ \end{align*}
Mathematica [C] time = 1.72762, size = 195, normalized size = 0.54 \[ -\frac{\frac{b^{5/2} \left (7 a^2+3 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{\tan (c+d x)}}{\sqrt{a}}\right )}{a^{3/2} \left (a^2+b^2\right )}+\frac{2 a^2+3 b^2}{a \sqrt{\tan (c+d x)}}+\frac{(-1)^{3/4} a \left ((a+i b)^2 \tan ^{-1}\left ((-1)^{3/4} \sqrt{\tan (c+d x)}\right )-(a-i b)^2 \tanh ^{-1}\left ((-1)^{3/4} \sqrt{\tan (c+d x)}\right )\right )}{a^2+b^2}-\frac{b^2}{\sqrt{\tan (c+d x)} (a+b \tan (c+d x))}}{a d \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.04, size = 576, normalized size = 1.6 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\left (a + b \tan{\left (c + d x \right )}\right )^{2} \tan ^{\frac{3}{2}}{\left (c + d x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 2.21377, size = 554, normalized size = 1.55 \begin{align*} -\frac{{\left (\sqrt{2} a^{2} + 2 \, \sqrt{2} a b - \sqrt{2} b^{2}\right )} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\sqrt{2} + 2 \, \sqrt{\tan \left (d x + c\right )}\right )}\right )}{2 \,{\left (a^{4} d + 2 \, a^{2} b^{2} d + b^{4} d\right )}} - \frac{{\left (\sqrt{2} a^{2} + 2 \, \sqrt{2} a b - \sqrt{2} b^{2}\right )} \arctan \left (-\frac{1}{2} \, \sqrt{2}{\left (\sqrt{2} - 2 \, \sqrt{\tan \left (d x + c\right )}\right )}\right )}{2 \,{\left (a^{4} d + 2 \, a^{2} b^{2} d + b^{4} d\right )}} + \frac{{\left (\sqrt{2} a^{2} - 2 \, \sqrt{2} a b - \sqrt{2} b^{2}\right )} \log \left (\sqrt{2} \sqrt{\tan \left (d x + c\right )} + \tan \left (d x + c\right ) + 1\right )}{4 \,{\left (a^{4} d + 2 \, a^{2} b^{2} d + b^{4} d\right )}} - \frac{{\left (\sqrt{2} a^{2} - 2 \, \sqrt{2} a b - \sqrt{2} b^{2}\right )} \log \left (-\sqrt{2} \sqrt{\tan \left (d x + c\right )} + \tan \left (d x + c\right ) + 1\right )}{4 \,{\left (a^{4} d + 2 \, a^{2} b^{2} d + b^{4} d\right )}} - \frac{{\left (7 \, a^{2} b^{3} + 3 \, b^{5}\right )} \arctan \left (\frac{b \sqrt{\tan \left (d x + c\right )}}{\sqrt{a b}}\right )}{{\left (a^{6} d + 2 \, a^{4} b^{2} d + a^{2} b^{4} d\right )} \sqrt{a b}} - \frac{2 \, a^{2} b \tan \left (d x + c\right ) + 3 \, b^{3} \tan \left (d x + c\right ) + 2 \, a^{3} + 2 \, a b^{2}}{{\left (a^{4} d + a^{2} b^{2} d\right )}{\left (b \tan \left (d x + c\right )^{\frac{3}{2}} + a \sqrt{\tan \left (d x + c\right )}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]